package cn.net.ecode.elec.plan.entity;

import cn.net.ecode.common.persistence.DataEntity;
import cn.net.ecode.common.utils.excel.annotation.ExcelField;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * 报电量Entity
 *
 * @author AlanShelby
 * @version 2019-08-28
 */
public class ElecPlan extends DataEntity<ElecPlan> {

    private static final long serialVersionUID = 1L;
    private String userId;        // 用户编码
    private String phone;        // 手机号
    private String btyteId;        // 企业编码
    private String yearAndMonth;        // 年月
    private Long kwh;        // 计划用电量
    private Double earnings; // 收益

    private String btypeName;        // 企业名称
    private String userName;        // 用户名称

    public ElecPlan() {
        super();
    }

    public ElecPlan(String id) {
        super();
        this.id = id;
    }

    @Length(min = 0, max = 64, message = "用户编码长度不能超过 64 个字符")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @ExcelField(title = "填报人手机号", align = 2, sort = 20)
    @Length(min = 0, max = 64, message = "手机号长度不能超过 64 个字符")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Length(min = 0, max = 64, message = "企业编码长度不能超过 64 个字符")
    public String getBtyteId() {
        return btyteId;
    }

    public void setBtyteId(String btyteId) {
        this.btyteId = btyteId;
    }

    @ExcelField(title = "时间", align = 2, sort = 40)
    @Length(min = 0, max = 64, message = "年月长度不能超过 64 个字符")
    public String getYearAndMonth() {
        return yearAndMonth;
    }

    public void setYearAndMonth(String yearAndMonth) {
        this.yearAndMonth = yearAndMonth;
    }

    @ExcelField(title = "计划用电量", align = 2, sort = 50)
    public Long getKwh() {
        return kwh;
    }

    public void setKwh(Long kwh) {
        this.kwh = kwh;
    }

    @ExcelField(title = "企业名称", align = 2, sort = 30)
    public String getBtypeName() {
        return btypeName;
    }

    public void setBtypeName(String btypeName) {
        this.btypeName = btypeName;
    }

    @ExcelField(title = "填报人姓名", align = 2, sort = 10)
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @ExcelField(title = "收益", align = 2, sort = 60)
    public Double getEarnings() {
        return earnings;
    }

    public void setEarnings(Double earnings) {
        this.earnings = earnings;
    }
}